package org.example.stockdemo.util;

import org.example.stockdemo.entity.StockDetail;
import org.example.stockdemo.entity.StockMonitor;

import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author :Mr.zhou
 * @description: TODO edit class Description
 * @create date: 2025/10/24 22:32
 */
public class CacheUtil {

    // 缓存分组 股票实时数据
    public static ConcurrentHashMap<Long, List<StockDetail>> groupStockCache = new ConcurrentHashMap<>();

    public static Boolean isFlush=true;

    // 指数code
    public static List<String> indexCodes = Arrays.asList("sh000001","sz399001","sz399006","sh588090");
    // 银行券商code
    public static List<String> bankQuanCodes = Arrays.asList("sh512800","sh512880");

    public static ConcurrentHashMap<String, StockDetail> indexCodesCache = new ConcurrentHashMap<>();

    // 股票code-股票详情
    public static ConcurrentHashMap<String, StockDetail> stockCodesRealDetail = new ConcurrentHashMap<>();

    public static ConcurrentHashMap<String, StockMonitor> stockMonitorCache = new ConcurrentHashMap<>();
}
